package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysUserbeanMapper;
import com.ruoyi.system.domain.SysUserbean;
import com.ruoyi.system.service.ISysUserbeanService;

/**
 * 用户信息Service业务层处理
 * 
 * @author liupeng
 * @date 2025-06-06
 */
@Service
public class SysUserbeanServiceImpl implements ISysUserbeanService 
{
    @Autowired
    private SysUserbeanMapper sysUserbeanMapper;

    /**
     * 查询用户信息
     * 
     * @param userId 用户信息主键
     * @return 用户信息
     */
    @Override
    public SysUserbean selectSysUserbeanByUserId(Long userId)
    {
        return sysUserbeanMapper.selectSysUserbeanByUserId(userId);
    }

    /**
     * 查询用户信息列表
     * 
     * @param sysUserbean 用户信息
     * @return 用户信息
     */
    @Override
    public List<SysUserbean> selectSysUserbeanList(SysUserbean sysUserbean)
    {
        return sysUserbeanMapper.selectSysUserbeanList(sysUserbean);
    }

    /**
     * 新增用户信息
     * 
     * @param sysUserbean 用户信息
     * @return 结果
     */
    @Override
    public int insertSysUserbean(SysUserbean sysUserbean)
    {

        sysUserbean.setCreateTime(DateUtils.getNowDate());
        return sysUserbeanMapper.insertSysUserbean(sysUserbean);
    }

    /**
     * 修改用户信息
     * 
     * @param sysUserbean 用户信息
     * @return 结果
     */
    @Override
    public int updateSysUserbean(SysUserbean sysUserbean)
    {
        sysUserbean.setUpdateTime(DateUtils.getNowDate());
        return sysUserbeanMapper.updateSysUserbean(sysUserbean);
    }

    /**
     * 批量删除用户信息
     * 
     * @param userIds 需要删除的用户信息主键
     * @return 结果
     */
    @Override
    public int deleteSysUserbeanByUserIds(Long[] userIds)
    {
        return sysUserbeanMapper.deleteSysUserbeanByUserIds(userIds);
    }

    /**
     * 删除用户信息信息
     * 
     * @param userId 用户信息主键
     * @return 结果
     */
    @Override
    public int deleteSysUserbeanByUserId(Long userId)
    {
        return sysUserbeanMapper.deleteSysUserbeanByUserId(userId);
    }
}
